package xyz.ddlnt.serviceusr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import xyz.ddlnt.model.dto.FollowDTO;
import xyz.ddlnt.model.entity.Follow;
import xyz.ddlnt.model.vo.FollowVO;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/10 21:30
 */
@Mapper
public interface FollowMapper extends BaseMapper<Follow> {

    /**
     * 判断是否已关注
     * @param followDTO
     * @return
     */
    boolean isExits(FollowDTO followDTO);

    /**
     * 获取关注列表
     * @param userId
     * @return
     */
    List<FollowVO> getFollowList(IPage<FollowVO> page,  Long userId);

    /**
     * 获取粉丝列表
     * @param userId
     * @return
     */
    List<FollowVO> getFansList(IPage<FollowVO> page,  Long userId);
}
